package com.zbkj.crmeb.marketing.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.common.CommonPage;
import com.common.PageParamRequest;
import com.github.pagehelper.PageInfo;
import com.zbkj.crmeb.chant.model.ChannelMerchant;
import com.zbkj.crmeb.front.response.ConfirmOrderResponse;
import com.zbkj.crmeb.front.response.PriceGroupResponse;
import com.zbkj.crmeb.marketing.model.StoreCouponUser;
import com.zbkj.crmeb.marketing.request.StoreCouponUserSearchRequest;
import com.zbkj.crmeb.marketing.response.StoreCouponUserResponse;
import com.zbkj.crmeb.store.model.StoreOrder;

import java.util.List;

public interface StoreCouponUserService extends IService<StoreCouponUser> {

    boolean use(StoreCouponUser storeCouponUser, ConfirmOrderResponse cor, ChannelMerchant channelMerchant, PriceGroupResponse currentOrderPriceGroup);

    /**
     * 优惠券用户
     * @param searchRequest
     * @param pageParamRequest
     * @return
     */
    CommonPage<StoreCouponUserResponse> pageFrontCouponUsers(StoreCouponUserSearchRequest searchRequest, PageParamRequest pageParamRequest);

    void rollbackByCancelOrder(StoreOrder storeOrder);

    /**
     * 优惠券用户订单号列表
     * @param searchRequest
     * @param pageParamRequest
     * @return
     */
    List<StoreOrder> listCouponUserOrderIds(StoreCouponUserSearchRequest searchRequest, PageParamRequest pageParamRequest);

    PageInfo<StoreCouponUserResponse> getList(StoreCouponUserSearchRequest scur, PageParamRequest pageParamRequest);
}
